package com.infore.dataAudit.remote.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.infore.dataAudit.remote.IBaseDataService;

import feign.hystrix.FallbackFactory;


@Component
public class BaseDataServiceFallbackFactory implements FallbackFactory<IBaseDataService>{
    private static final Logger log = LoggerFactory.getLogger(BaseDataServiceFallbackFactory.class);
    @Override
    public IBaseDataService create(Throwable e) {
        log.error("BaseDataService 触发熔断!" + e.getMessage());
        System.out.println("<<<<<<<<<<<"+"BaseDataService fallback:" + e.getMessage()+">>>>>>>>>>>");
        return new DefaultBaseDataServiceFallBack();
    }

}
